Optimal. Leaf size=51 \[ \frac {c \sqrt {a+\frac {b}{x}} x}{a}-\frac {(b c-2 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{a^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {382, 79, 65,
214} \begin {gather*} \frac {c x \sqrt {a+\frac {b}{x}}}{a}-\frac {(b c-2 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{a^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 79
Rule 214
Rule 382
Rubi steps
\begin {align*} \int \frac {c+\frac {d}{x}}{\sqrt {a+\frac {b}{x}}} \, dx &=-\text {Subst}\left (\int \frac {c+d x}{x^2 \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right )\\ &=\frac {c \sqrt {a+\frac {b}{x}} x}{a}-\frac {\left (-\frac {b c}{2}+a d\right ) \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right )}{a}\\ &=\frac {c \sqrt {a+\frac {b}{x}} x}{a}-\frac {\left (2 \left (-\frac {b c}{2}+a d\right )\right ) \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+\frac {b}{x}}\right )}{a b}\\ &=\frac {c \sqrt {a+\frac {b}{x}} x}{a}-\frac {(b c-2 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{a^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 51, normalized size = 1.00 \begin {gather*} \frac {c \sqrt {a+\frac {b}{x}} x}{a}+\frac {(-b c+2 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{a^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(173\) vs.
\(2(43)=86\).
time = 0.04, size = 174, normalized size = 3.41
method | result | size |
risch | \(\frac {c \left (a x +b \right )}{a \sqrt {\frac {a x +b}{x}}}+\frac {\left (\frac {\ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x}\right ) d}{\sqrt {a}}-\frac {\ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x}\right ) b c}{2 a^{\frac {3}{2}}}\right ) \sqrt {x \left (a x +b \right )}}{x \sqrt {\frac {a x +b}{x}}}\) | \(108\) |
default | \(-\frac {\sqrt {\frac {a x +b}{x}}\, x \left (2 \sqrt {x \left (a x +b \right )}\, a^{\frac {3}{2}} d -2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}\, b c -2 \sqrt {a \,x^{2}+b x}\, a^{\frac {3}{2}} d -\ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a b d -\ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a b d +\ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) b^{2} c \right )}{2 \sqrt {x \left (a x +b \right )}\, b \,a^{\frac {3}{2}}}\) | \(174\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 109 vs.
\(2 (43) = 86\).
time = 0.50, size = 109, normalized size = 2.14 \begin {gather*} \frac {1}{2} \, c {\left (\frac {2 \, \sqrt {a + \frac {b}{x}} b}{{\left (a + \frac {b}{x}\right )} a - a^{2}} + \frac {b \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right )}{a^{\frac {3}{2}}}\right )} - \frac {d \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right )}{\sqrt {a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.64, size = 115, normalized size = 2.25 \begin {gather*} \left [\frac {2 \, a c x \sqrt {\frac {a x + b}{x}} - {\left (b c - 2 \, a d\right )} \sqrt {a} \log \left (2 \, a x + 2 \, \sqrt {a} x \sqrt {\frac {a x + b}{x}} + b\right )}{2 \, a^{2}}, \frac {a c x \sqrt {\frac {a x + b}{x}} + {\left (b c - 2 \, a d\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a x + b}{x}}}{a}\right )}{a^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 23.03, size = 82, normalized size = 1.61 \begin {gather*} \frac {\sqrt {b} c \sqrt {x} \sqrt {\frac {a x}{b} + 1}}{a} - \frac {2 d \operatorname {atan}{\left (\frac {1}{\sqrt {- \frac {1}{a}} \sqrt {a + \frac {b}{x}}} \right )}}{a \sqrt {- \frac {1}{a}}} - \frac {b c \operatorname {asinh}{\left (\frac {\sqrt {a} \sqrt {x}}{\sqrt {b}} \right )}}{a^{\frac {3}{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 89 vs.
\(2 (43) = 86\).
time = 0.60, size = 89, normalized size = 1.75 \begin {gather*} -\frac {{\left (b c \log \left ({\left | b \right |}\right ) - 2 \, a d \log \left ({\left | b \right |}\right )\right )} \mathrm {sgn}\left (x\right )}{2 \, a^{\frac {3}{2}}} + \frac {\sqrt {a x^{2} + b x} c}{a \mathrm {sgn}\left (x\right )} + \frac {{\left (b c - 2 \, a d\right )} \log \left ({\left | -2 \, {\left (\sqrt {a} x - \sqrt {a x^{2} + b x}\right )} \sqrt {a} - b \right |}\right )}{2 \, a^{\frac {3}{2}} \mathrm {sgn}\left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.98, size = 88, normalized size = 1.73 \begin {gather*} \frac {2\,d\,\mathrm {atanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}}+\frac {2\,c\,x\,\left (\frac {3\,\sqrt {b}\,\sqrt {b+a\,x}}{2\,a\,x}+\frac {b^{3/2}\,\mathrm {asin}\left (\frac {\sqrt {a}\,\sqrt {x}\,1{}\mathrm {i}}{\sqrt {b}}\right )\,3{}\mathrm {i}}{2\,a^{3/2}\,x^{3/2}}\right )\,\sqrt {\frac {a\,x}{b}+1}}{3\,\sqrt {a+\frac {b}{x}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________